package com.xiongxiong.yiqing.pojo.vo;

import com.baomidou.mybatisplus.annotation.*;
import com.xiongxiong.yiqing.pojo.RecordCard;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author 熊熊很酷
 * @since 2022-12-14
 */
@Data
public class RecordCardVO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    private Long id;

    @ApiModelProperty("用户id")
    private Long userId;

    @ApiModelProperty("身体状态")
    private String bodyState;

    @ApiModelProperty("体温")
    private String temperature;

    @ApiModelProperty("阴阳: 阴性, 阳性, 待检测")
    private String yinOrYang;

    @ApiModelProperty("打卡地点")
    private String recordAddress;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

//    ==================================================

    @ApiModelProperty("电话账号")
    private String phoneNub;

    @ApiModelProperty("姓名")
    private String userName;

    @ApiModelProperty("性别（true代表男，false代表女")
    private Boolean sex;

    public static RecordCardVO getRecordCardVO(RecordCard record) {
        RecordCardVO cardVO = new RecordCardVO();
        cardVO.setId(record.getId());
        cardVO.setUserId(record.getUserId());
        cardVO.setBodyState(record.getBodyState());
        cardVO.setTemperature(record.getTemperature());
        cardVO.setYinOrYang(record.getYinOrYang());
        cardVO.setRecordAddress(record.getRecordAddress());
        cardVO.setCreateTime(record.getCreateTime());
        return cardVO;
    }
}
